//
// Created by wze-zero on 2024/9/6 006.
//
#include <iostream>
#include <iomanip>

using namespace std;

int main() {
    double price;
    cin >> price;
    if (price >= 5000) {
        price = price * 0.6;
    } else if (price >= 2000) {
        price = price * 0.7;
    } else if (price >= 500) {
        price = price * 0.8;
    } else if (price >= 100) {
        price = price * 0.9;
    } else {
        price = price;
    }
    cout << setiosflags(ios::fixed) << setprecision(1) << price << endl;
    return 0;
}
